home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / mflzt.exe / lha / MFLZT.DOC < prev    next >
Text File  |  1989-11-26  |  27KB  |  995 lines

  1.          
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                           ==============================
  15.                           = MICROFIRM FUNCTION LIBRARY =
  16.                           =      for Zortech C/C++     =
  17.                           =          - by -            =
  18.                           =         Bob Stout          =
  19.                           ==============================
  20.  
  21.  
  22.                   Functions and Documentation Copyright 1988-89
  23.                          by Robert B. Stout dba MicroFirm
  24.  
  25.                  Portions Copyright 1986-87 by Steven E. Margison
  26.  
  27.                              -- All Rights Reserved --
  28.  
  29.  
  30.                                 ISBN 0-944267-06-8
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.          
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.          
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.                       --------- TABLE OF CONTENTS ---------
  79.  
  80.  
  81.               Introduction ................................. 1
  82.               The Documentation ............................ 1
  83.               Installation ................................. 2
  84.               Linking ...................................... 3
  85.               Interrupt Handler Functions .................. 4
  86.               Utilities .................................... 5
  87.               Portability .................................. 9
  88.               Shareware .................................... 10
  89.               Warranty ..................................... 11
  90.               Registration Form ............................ 12
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.          
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.          
  138.  
  139.  
  140.  
  141.  
  142.                   The MicroFirm Function Library for Zortech C/C++
  143.  
  144.  
  145.          I. INTRODUCTION
  146.  
  147.                  The heart  of  the  C  language  is  its  library.  Each
  148.          compiler has its own library of  functions,  which  is  complete
  149.          only  to  the degree that the compiler author wishes to make it.
  150.          The Zortech C++ Compiler  is  an  excellent  product  which  has
  151.          gotten  rave   reviews  in  computer  magazines.   The  greatest 
  152.          criticism  which  can be leveled at Zortech is the size  of  its
  153.          library.  It has all the usual  basic  functions, plus some nice
  154.          unique  features.  But it still can  use  some help.  Enter  the
  155.          MicroFirm Library!  At  over  200  functions  my library greatly
  156.          enhances program development with Zortech C/C++.
  157.  
  158.  
  159.  
  160.  
  161.          II. THE DOCUMENTATION
  162.  
  163.                  The  documentation  for  the library is contained in the
  164.          file, MFL_FUNC.MAN, which describes each function.   A companion
  165.          quick reference,  MFL_QREF.DOC, is also provided  which  briefly
  166.          lists   the  prototypes  and  functional  descriptions  for  all
  167.          lirary functions. Additional documentation includes TKNOTES.DOC,
  168.          containing technical notes  on the current release, README which
  169.          contains  miscellaneous  information  along  with  changes  from
  170.          previous versions, and CREDITS wherein the folks who helped make
  171.          this library a reality are given proper recognition.
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.                   MicroFirm Function Library for Zortech         Page 1
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.          
  203.  
  204.  
  205.          III. INSTALLATION
  206.  
  207.          The  MicroFirm  Function  Library is distributed as four library
  208.          files for each type of memory model. (Only the full registration
  209.          with source has all four libraries.) The filenames are:
  210.  
  211.               MFLZTS.LIB       Small Memory Model
  212.               MFLZTC.LIB       Compact Memory Model
  213.               MFLZTM.LIB       Medium Memory Model
  214.               MFLZTL.LIB       Large Memory Model
  215.  
  216.          For the remainder of this manual the libraries will be  referred
  217.          to as MFLZTx.LIB.
  218.  
  219.          A  typical  hard disk installation of Zortech  will consist of a
  220.          directory  named  \ZORTECH  which will be the root directory for
  221.          compiler,  libraries,  and  header files.  MFLZTx.LIB  should be
  222.          copied  into  \ZORTECH\LIB,  or  into  whatever   directory  the
  223.          Zortech libraries have been installed.
  224.  
  225.          The  MicroFirm  Function  Library  also  includes several header
  226.          files which list "define"s  for many useful items.  These header
  227.          files  are  also  required  to  re-compile  the  source  for the
  228.          libraries.   The  header   files  should   be  copied  into  the
  229.          \ZORTECH\INCLUDE  directory,  or  in  whatever  other  directory
  230.          contains STDIO.H, DOS.H, and the other header files. If you have
  231.          purchased  the  source files and wish to have them on hard disk,
  232.          make  a  new  subdirectory under the \ZORTECH\LIB main directory
  233.          called  MFL  (C:\ZORTECH\LIB\MFL)  and  copy all source files to
  234.          that directory.
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.                   MicroFirm Function Library for Zortech         Page 2
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.          
  269.  
  270.  
  271.          IV. LINKING
  272.  
  273.                  The MFLZTx.LIB library must  be  linked  with  any other
  274.          libraries whenever  a  function  is  used in your program.  Some
  275.          programs may not use  MFLZTx.LIB  functions,  and  therefore the
  276.          linking of  the  library  may  be  eliminated to save time.  The
  277.          Zortech driver (ZTC) command line would look like this:
  278.  
  279.                  ZTC MYPROGRAM \ZORTECH\MFLZTS.LIB
  280.  
  281.          Naturally, if your directory  structure  is  not  the  standard,
  282.          specify the  paths  as  needed.   In addition, if you have other
  283.          third party libraries, be sure to include them after MFLZTx.LIB.
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.                   MicroFirm Function Library for Zortech         Page 3
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.          
  335.  
  336.  
  337.          V. INTERRUPT HANDLER FUNCTIONS
  338.  
  339.                  A special feature of  The MicroFirm Function  Library is
  340.          the various interrupt handler functions.  These are:
  341.  
  342.                ticker
  343.                ctlbrk
  344.                criterr
  345.  
  346.          These functions provide  the  programmer  with  the  ability  to
  347.          install   a   special  routine  to  intercept  one  of  the  DOS
  348.          interrupts. ctlbrk()  installs  a  user-defined  routine  to  be
  349.          executed  whenever  a  control-break  is  typed on the keyboard.
  350.          criterr() traps the DOS critical error  handler  (the  one  that
  351.          says Abort, Retry, etc.) and allows the programmer to substitute
  352.          his  own  handler.  ticker()  is  not  really  a  user definable
  353.          handler, but a  pre-built  handler  which  allows  the  user  to
  354.          perform operations  relative  to  the system's clock.  A special
  355.          variable  may  be  loaded  with  a  value  and  then  tested  at
  356.          intervals.  When the variable has hit zero, a specific amount of
  357.          time has passed.  The variable counts 18.2 times per second, and
  358.          is installed on INT 1CH.
  359.  
  360.          The  usage  of  these interrupt handlers is slightly complex and
  361.          interactive.  For example, if you  use  ticker()  you  must  use
  362.          ctlbrk() and  you  may  have to use criterr().  It has been said
  363.          that a picture is worth a thousand words.  Well, to me, a source
  364.          file is worth a whole chapter of tutorial.  Therefore, refer  to
  365.          TESTINTS.C,  which  is  supplied  with all distributions of  The
  366.          MicroFirm  Function  Library,  to see a heavily commented source
  367.          code  file  which  uses  these  interrupts.  This program may be
  368.          compiled and run to watch the result.
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.                   MicroFirm Function Library for Zortech         Page 4
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.          
  401.  
  402.  
  403.          VI. THE UTILITIES
  404.                  Included  in the self-extracting archive, DEMOS.COM, are
  405.          the source code for several utiltiies originally written for the
  406.          SMTC library by Steve Margison. Nothing earth shaking here, just
  407.